-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Payload support #1
Conversation
A real test is not possible since I'd need access to user private key.
Conflicts: README.md src/WebPush.php tests/WebPushTest.php
Hey Minishlink, IIRC phpecc has known vulnerabilities. |
Thanks for the info! :) It surely is worth waiting, I'll look into it. |
Hola. Is payload encryption works for firefox? I try run project it generated salt & publicKey, but payload not received by browser. This sample is works fine https://jrconlin.github.io/WebPushDataTestPage/, but in this sample shared key & encryption key length is less than in you code |
Hi, payload is not yet supported because PHP doesn't provide enough access to OpenSSL yet. This will likely be the case with PHP 7.1. This PR is here to implement the changes made to resolve the aforementioned bugs. Its development is paused since the bug fixes are not yet merged in any PHP version, beta or not. As explained in the README, a workaround is to store the payload in your server, to send notifications without payload, and to make the client fetch the corresponding payload stored in the server, using the endpoint as identification. But, if you really need "real" payload support, you will have to drop PHP for Node.js. Note that payload won't be delivered in Chrome (though it may have changed since the last time I checked). |
@Minishlink have you seen https://github.com/Spomky-Labs/jose/blob/master/src/Util/GCM.php? It was suggested in https://bugs.php.net/bug.php?id=67304. |
@marco-c Yep, I'll probably look into it this weekend. :) Thanks for the notification btw. |
The output is the same as my library. |
I'll have a look into what is needed to support normal GCM endpoint (in hindsight - it wasn't helpful using the other endpoint - apologies for not thinking it through) |
Thanks. If I'm not mistaken, the temporary server has been updated as I can see that the aforementioned behavior now works well. :) |
instead of the bigger spomky-labs/jose
* WIP: initial concept of returning report objects * WIP: add a test * Docs update Change results handling example * Attempt to fix tests #1 * Change flush() signature for easier mocking * Unqualify iterable * Remove ignored vagrant file
If you want to help: (thanks!)